const sleep = (ms = 500) => new Promise((resolve) => setTimeout(resolve, ms));

/**
 * 加密手机号
 * @param mobile 手机号
 * @returns {string} cMobile
 */
const encryptMobile = (mobile = '') => {
	if (!mobile) return '';
	
	return mobile.replace(/(\d{3})\d{4}(\d{4})/, '$1****$2');
}

export {
    sleep,
	encryptMobile
};